home *** CD-ROM | disk | FTP | other *** search
- #include <A4Stuff.h>
- #include <Traps.h>
- #include "MenuSelect.h"
- //#include "ShowIconFamily.h"
-
- OSErr InstallPatches(void);
- pascal void main(void);
- pascal long MenuSelectPatch(Point where);
-
-
-
- enum{kINITID = 0 };
-
-
-
- pascal void main(void)
- {
- long oldA4;
- Handle h = Get1Resource('INIT', kINITID);
- OSErr result = noErr;
-
- if (h == nil)
- return;
-
- DetachResource(h);
-
- oldA4 = SetCurrentA4();
-
- result = InstallPatches();
-
- SetA4(oldA4);
-
-
- /*if (result != noErr)
- ShowIconFamily(129);
- else
- ShowIconFamily(128);*/
-
- }
-
- long gOriginalMenuSelectAddress = 0;
-
- OSErr InstallPatches(void)
- {
- OSErr result = noErr;
-
- gOriginalMenuSelectAddress = (long) GetToolTrapAddress(_MenuSelect);
- SetToolTrapAddress( (UniversalProcPtr)MenuSelectPatch, _MenuSelect);
-
-
- return result;
- }
-
-
-
- pascal long MenuSelectPatch(Point where)
- {
- long oldA4 = SetCurrentA4();
-
- long result = AltMenuSelect(where, kFXSlide, kFXZoomIn);
-
- SetA4(oldA4);
-
- return result;
- }
-
-
-
-